﻿using MiniFox.Log;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Net
{
    /// <summary>
    /// 
    /// </summary>
    public interface IWebAdapter
    {
        /// <summary>
        /// 
        /// </summary>
        string Name
        {
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        string Host
        {
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        bool SSL
        {
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        int Port
        {
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        string FullHost
        {
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        ILogger Logger
        {
            get;
        }
    }
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TS"></typeparam>
    public interface IWebAdapter<TS> : IWebAdapter where TS : IService
    {
        /// <summary>
        /// 
        /// </summary>
        ServiceCollection<TS> Services { get; }
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        TS GetService(string name);
    }
}
